package com.lx.zy.common.exception;

/**
 * @program: zy-vue
 * @description: 自定义异常
 * @author: Lx
 * @create: 2019-10-17 22:06
 **/
public class CustomException extends RuntimeException
{
    private static final long serialVersionUID = -7318375885110188282L;

    private Integer code;

    private String message;

    public CustomException(String message)
    {
        this.message = message;
    }

    public CustomException(String message, Integer code)
    {
        this.message = message;
        this.code = code;
    }

    public CustomException(String message, Throwable e)
    {
        super(message, e);
        this.message = message;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public Integer getCode()
    {
        return code;
    }
}
